package com.tcxhb.job.core.service.job;

import com.tcxhb.job.dao.dataobject.JobInstanceDO;
import com.tcxhb.job.common.model.MiscResult;

/**
 * @Description:
 * @Auther: tcxhb
 * @Date: 2023/11/5
 */
public interface AgentApiService {
    /**
     * @param instanceDO
     * @return
     */
    public MiscResult<Boolean> run(JobInstanceDO instanceDO);

    /**
     * 心跳
     *
     * @return
     */
    public MiscResult<Boolean> beat(String host, Integer port, String cmd);

    /**
     * 查询任务状态
     *
     * @param instanceDO
     * @return
     */
    public MiscResult<Integer> status(JobInstanceDO instanceDO);
}
